import { onMounted,inject,toRef } from "vue";
import useWebSiteStore from "@/store/websiteStore";

const useWebsites = ()=>{
    const webSiteStore = useWebSiteStore();
    // inject需要在方法里面
    const {keywords} = inject('searchbar-keywords')
    onMounted(() => {
      webSiteStore.init();
    });
    return {
        webSiteStore,
        keywords
    };
}
// 对外暴露
export default useWebsites;